package com.java.yz.day13.ketang;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

//加入异常出库的IO操作
public class FileOutPutStreamDemo3 {
    public static void main(String[] args) {
        File file = new File("src/com/java/yz/day13/ketang/b.txt");
        FileOutputStream fos = null;
        //这是加入了一场处理的IO流
        try {
           fos = new FileOutputStream(file);
           //接下来的写入操作在这个里面
            byte[] bytes = {97,98,99,100};
            fos.write(bytes);
            //fos.write("\t\n".getBytes());

        }catch (IOException e){
            e.printStackTrace();
        }finally {
            if (fos != null){
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
